package com.example.thirdjarlearningstarter.autoconfigure;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 指定第三方jar包专用的Properties
 */
// 使用 `@ConfigurationProperties` 注解声明 Properties前缀。
// 注意此注解要生效需要引入 spring-boot-configuration-processor 依赖
@ConfigurationProperties(prefix = "third-jar-leanrning")
@Data
public class ThirdJarLearningProperties {
    // 那么此时在 application.properties 文件中写的配置项全名就是 third-jar-leanrning.nickName / third-jar-leanrning.age
    private String nickName;
    private Integer age;
}
